package com.eastcom.providor.dao.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.eastcom.bm.atom.Atom_NeType;
import com.eastcom.providor.dao.BaseDao;
import com.eastcom.providor.dao.INeTypeDao;

public class NeTypeDao extends BaseDao implements INeTypeDao{

	public List<Atom_NeType> selectAllNeType() {
		return this.getObjects(Atom_NeType.class);
	}

	public Atom_NeType getNeTypeByID(String id) {
		return this.getObject(Atom_NeType.class, id);
	}
	
	public Map<String,Atom_NeType> getNeTypeMap(){
		List<Atom_NeType> list=selectAllNeType();
		Map<String, Atom_NeType> result=new HashMap<String, Atom_NeType>();
		for(Atom_NeType at:list){
			result.put(at.getId(), at);
		}
		return result;
	}

	public void saveNeType(Atom_NeType neType) throws Exception {
		try{
			this.saveObject(neType);
		}catch(Exception e)
		{
			e.printStackTrace();
			throw e;
		}
		
	}

}
